//根据后台返回数据和本地路由配置数据进行对比，对比之后得到用户路由页面
export default function recursionRoutes(allRoutes=[],menulist=[]){
    //  console.log(allRoutes);
    //   console.log(menulist);
    let userRoutes = []
    menulist.forEach(menuitem=>{
        allRoutes.forEach(routeitem=>{
            if(menuitem.title === routeitem.meta.key){
                if(menuitem.children&&menuitem.children.length>0){
                    routeitem.children = recursionRoutes(routeitem.children,menuitem.children)
                }
                userRoutes.push(routeitem)
            }
        })
    })
    return userRoutes
}